#include "../head.h"

/*主页模块 */

void begin()
{
    while (1)
    {
        show_bmp(0, 0, "death/homepage.bmp");
        int flag1 = 0, flag2 = 0;

        struct cor p = {-1, -1};
        p = get_touch();
        if (p.x >= 50 && p.x <= 490 && p.y >= 40 && p.y <= 190) // 相片
        {
            printf("play album\n");
            play_audio("death/TimeMachine.mp3");        //media/zw.mp3
            photo_player();
        }else if (p.x >= 50 && p.x <=490 && p.y >= 210 && p.y <= 360) // 视频
        {
            show_bmp(0, 440, "death/pause.bmp");     //media/bofang.bmp
            video_player();
        }
    }
}